// JavaScript Document
var Rfloatobj = function(){
var Rfloat = {
	initialize:function(id_1,id_2,id_3,Num,id_4,id_5){
        this.Floatobj = document.getElementById(id_1);
		this.Floatobj.style["position"] = "absolute";
		this.Floatobj.style["zIndex"] = "20";
		this.Floatobj.style["right"] = Num;	
		this.Floatobj.style["top"] = (document.documentElement.clientHeight/2)-(this.Floatobj.offsetHeight/2)+"px";
		this.floatSmall = id_2;
		this.floatBig = id_3;
		this.floatletter = id_4;
		this.floatcover = id_5;
		this.lastScrollY=0;
		this.diffY = "";
		this.percent = "";
		},
	coverhidden:function(){		
		document.getElementById(this.floatletter).style["display"] = "none";
		document.getElementById(this.floatcover).style["display"] = "none";			
		},			
	covershow:function(){
		document.getElementById(this.floatletter).style["display"] = "block";
		document.getElementById(this.floatcover).style["display"] = "block";		
		},
	hiddenshow:function(Id){
		if(Id == this.floatBig){
			document.getElementById(Id).style.display = "none";
			document.getElementById(this.floatSmall).style.display = "block";
			this.Floatobj.style.width = document.getElementById(this.floatSmall).offsetWidth+"px";
			this.Floatobj.style.height = document.getElementById(this.floatSmall).offsetHeight+"px";
		}
		if(Id == this.floatSmall){
			document.getElementById(Id).style.display = "none";
			document.getElementById(this.floatBig).style.display = "block";
			this.Floatobj.style.width = document.getElementById(this.floatBig).offsetWidth+"px";
			this.Floatobj.style.height = document.getElementById(this.floatBig).offsetHeight+"px";
		}
		
		},
	floatscroll:function(){	
		if (document.documentElement && document.documentElement.scrollTop){
		      this.diffY = document.documentElement.scrollTop;
		   }else if (document.body){
		      this.diffY = document.body.scrollTop
		   }
		else{/*Netscape stuff*/}
		this.percent=0.1*(this.diffY-this.lastScrollY); 
		if(this.percent>0){
			this.percent=Math.ceil(this.percent);
			}else {
				this.percent=Math.floor(this.percent);
			} 
		this.Floatobj.style["top"]=parseInt(this.Floatobj.style["top"])+this.percent+"px";
		this.lastScrollY=this.lastScrollY+this.percent;
		
		
		}
	}
	return Rfloat;
}